package com.kgc.sbt.mapper;

import com.kgc.sbt.domain.Cart;
import com.kgc.sbt.domain.CartExample;
import java.util.List;
import java.util.Map;

import com.kgc.sbt.domain.CartFrom;
import org.apache.ibatis.annotations.Param;

public interface CartMapper {
        long countByExample(CartExample example);

        int deleteByExample(CartExample example);

        int deleteByPrimaryKey(Integer id);

        int insert(Cart record);

        int insertSelective(Cart record);

        List<Cart> selectByExample(CartExample example);

        Cart selectByPrimaryKey(Integer id);

        int updateByExampleSelective(@Param("record") Cart record, @Param("example") CartExample example);

        int updateByExample(@Param("record") Cart record, @Param("example") CartExample example);

        int updateByPrimaryKeySelective(Cart record);

        int updateByPrimaryKey(Cart record);

        List<Cart> selectByUserId(Integer userId);

        List<Cart> selectByIds(@Param("ids") Integer[] ids);

        int deleteByIds(@Param("ids") Integer[] ids);

        List<CartFrom> selcetCartByUserId(Integer userId);


        int updateCaryNumberAdd(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId, @Param("number") Integer number);

        int updateCaryNumberDel(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId, @Param("number") Integer number);

        Cart selectCartByUserIdAddGoodsId(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId);

}